# coding:utf-8
import turtle


def drawNRect(width, n, x, y):
    turtle.setheading(0)
    turtle.penup()
    turtle.goto(x, y)
    turtle.pendown()
    for i in range(0, n+1):
        turtle.forward(width)
        turtle.left(360/n)
    pass


if __name__ == "__main__":
    turtle.Screen()
    turtle.setup(1000, 600)
    drawNRect(100, 3, 0, 0)
    drawNRect(90, 4, -100, 100)
    drawNRect(80, 5, 100, 100)
    drawNRect(70, 6, -100, -100)
    drawNRect(60, 7, 100, -100)
    turtle.exitonclick()
    pass
